home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
350
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
1KB
Path: solon.com!not-for-mail
From: seebs@solon.com (Peter Seebach)
Newsgroups: comp.std.c,comp.lang.c.moderated
Subject: Re: Integral promotion.
Date: 21 Feb 1996 19:15:45 -0600
Organization: Usenet Fact Police (Undercover)
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4ggg41$91j@solutions.solon.com>
References: <4ggbcq$81c@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
In article <4ggbcq$81c@solutions.solon.com>,
Jens M Andreasen <jens-and@dsv.su.se> wrote:
>I admit that I am confused too. So in this case the compiler should issue a
>warning for { short x = 0; x++; } since "x++" equals "x = x + 1" and both
>"x" and "1" are promoted to integers, and there could therefore be a
>potential loss of precision because "sizeof(int) > sizeof(short)", but no
>precision could have been lost if int and short had been the same (small)
>size ?? <phew>
x++ is not the same as "x = x + 1". "++x" nearly is.
-s
--
Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
FUCK the communications decency act. Goddamned government. [literally.]
The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.txt